#include <stdio.h>
#include <string.h>

char *func(const char *s1, const char *s2, char *s3){
	int i = 0;
	int j = 0;
	int k = 0;
	while(s1[i] != '\0' && s2[j] != '\0'){
		if(s1[i] < s2[j]){
			s3[k] = s1[i];
			i++;
		}else{		
			s3[k] = s2[j];
			j++;
		}
		k++;
	}
	s3[k] = '\0';
	if('\0' == s1[i]){ // s1先结束了
		strcat(s3, s2+j);
	}else{ // s2先结束了
		strcat(s3, s1+i);
	}
	return s3;
}

int main(){
	char str1[128] = "acegik";
	char str2[128] = "bdfhjlmnxyz";
	char str3[256] = {0};
	func(str1, str2, str3);
	printf("%s\n", str3); // abcdefghijklmnxyz
	return 0;
}
